<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
                    <!-- 个人成绩查询 -->
<script type="text/javascript">
$(function(){
	$('#button').button();
})
function bjChange(value){
	$.post('selfGrade/getstu',{bjId:value},function(data){
			$('#stu').html(data);
		},'html');
}

function cx(){
	var stuId=$('#stu').val();
	$('#table').load('selfGrade/table',{stuId:stuId});
}

function cjChange(id,value){
	$.post('selfGrade/cjChange',{id:id,grade:value},function(data){});
}
</script>
<style type="text/css">
	#stu{
		width: 200px;
		height: 50px;
		border:2px solid #a1a1a1;
		padding:10px 40px; 
		border-radius:25px;
	}
	#bj{
		width: 200px;
		height: 50px;
		border:2px solid #a1a1a1;
		padding:10px 40px; 
		border-radius:25px;
	}
</style>

<body>
	<div>
		<p align="center" >
			<label>班级：</label>
			<select id="bj" onchange="bjChange(this.value)">
				<option value="0">----请选择----</option>
				<c:forEach items="${list}" var="bj">
					<option value="${bj.id }">${bj.name}</option>
				</c:forEach>				
			</select>
			<label>学生：</label>
			<select id="stu">
				<option value="0">-----请选择-----</option>
			</select>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			<button onclick="cx()" id="button">查询</button>
		</p>
	</div>
	<div id="table"></div>
